import request from '@/plugins/request';

// 下载指定文件
export function downloadFile(data: Record<string, any>) {
  return request({
    url: '/api/oss/download/' + data.fileId,
    method: 'get',
  });
}

// 下载指定文件
export function previewFile(data: Record<string, any>) {
  return request({
    url: '/api/oss/preview/' + data.fileId,
    method: 'get',
  });
}
// 上传文件
export function uploadFile(data: Record<string, any>) {
  return request({
    url: '/api/oss/upload',
    method: 'post',
    data,
  });
}
